class Category < ActiveRecord::Base
  belongs_to :thematic
#  belongs_to :father_category, :class_name => "Category", :foreign_key => "category_id"
#  has_many :children_categories, :class_name => "Category", :foreign_key => "category_id"

  acts_as_tree :foreign_key => 'category_id'

  def name_to_local_language
    if I18n.locale == 'es'
      return name_es
    else
      return name_en
    end
  end
end
